import React, { Component } from 'react'

export default class Child extends Component {
  render() {
    return (
      <div>
        {/* #2 类组件通过 this.props 进行接收 */}
        <p>Child: {this.props.salary}</p>
        <p>字符串 age: {typeof this.props.age}</p>
        <p>数字 num: {typeof this.props.num}</p>
        <p>字符串 oBar: {typeof this.props.oBar}</p>
        <p>字符串 oBar: {typeof this.props.oBar}</p>
        <p>布尔值 bBar: {typeof this.props.bBar}</p>
        <p>对象: {this.props.obj1.name}</p>
        <p>函数: {this.props.fn()}</p>
        <div>JSX: {this.props.jsx}</div>
      </div>
    )
  }
}
